#coding=utf-8
#Boa:FramePanel:PanelAssets

import wx

from product import CDataAssets
from MyListCtrl import *

[wxID_PANELASSETS, wxID_PANELASSETSBTNDEL, wxID_PANELASSETSBTNRECALC, 
 wxID_PANELASSETSBTNSAVE, wxID_PANELASSETSBTNSAVENEW, 
 wxID_PANELASSETSSTATICTEXT1, wxID_PANELASSETSSTATICTEXT10, 
 wxID_PANELASSETSSTATICTEXT11, wxID_PANELASSETSSTATICTEXT12, 
 wxID_PANELASSETSSTATICTEXT13, wxID_PANELASSETSSTATICTEXT14, 
 wxID_PANELASSETSSTATICTEXT15, wxID_PANELASSETSSTATICTEXT16, 
 wxID_PANELASSETSSTATICTEXT17, wxID_PANELASSETSSTATICTEXT18, 
 wxID_PANELASSETSSTATICTEXT19, wxID_PANELASSETSSTATICTEXT2, 
 wxID_PANELASSETSSTATICTEXT20, wxID_PANELASSETSSTATICTEXT21, 
 wxID_PANELASSETSSTATICTEXT22, wxID_PANELASSETSSTATICTEXT23, 
 wxID_PANELASSETSSTATICTEXT24, wxID_PANELASSETSSTATICTEXT25, 
 wxID_PANELASSETSSTATICTEXT26, wxID_PANELASSETSSTATICTEXT27, 
 wxID_PANELASSETSSTATICTEXT28, wxID_PANELASSETSSTATICTEXT3, 
 wxID_PANELASSETSSTATICTEXT4, wxID_PANELASSETSSTATICTEXT5, 
 wxID_PANELASSETSSTATICTEXT6, wxID_PANELASSETSSTATICTEXT7, 
 wxID_PANELASSETSSTATICTEXT8, wxID_PANELASSETSSTATICTEXT9, 
 wxID_PANELASSETSSTGEARING, wxID_PANELASSETSTCACCOUNTPAYABLE, 
 wxID_PANELASSETSTCACCOUNTPREPAID, wxID_PANELASSETSTCACCOUNTRECV, 
 wxID_PANELASSETSTCADVANCERECEIPTS, wxID_PANELASSETSTCBADDEBTS, 
 wxID_PANELASSETSTCCAPITAL, wxID_PANELASSETSTCCAPTICALRESERVE, 
 wxID_PANELASSETSTCCASH, wxID_PANELASSETSTCCURRENTLIABILITIES, 
 wxID_PANELASSETSTCDEPRECIATION, wxID_PANELASSETSTCEARNINGSRESERVE, 
 wxID_PANELASSETSTCFIXEDASSETS, wxID_PANELASSETSTCINVENTORIES, 
 wxID_PANELASSETSTCLONGLIABILITIES, wxID_PANELASSETSTCMEMO, 
 wxID_PANELASSETSTCNONCURRENTASSETS, wxID_PANELASSETSTCOTHERASSETS, 
 wxID_PANELASSETSTCOTHERPAYABLES, wxID_PANELASSETSTCOWNERANDLIABILITIES, 
 wxID_PANELASSETSTCOWNEREQUITY, wxID_PANELASSETSTCQUIPPRICEORI, 
 wxID_PANELASSETSTCRETAINEDEARNINGS, wxID_PANELASSETSTCSHORTTERM, 
 wxID_PANELASSETSTCTOTALASSETS, wxID_PANELASSETSTCTOTALBADDEBTS, 
 wxID_PANELASSETSTCTOTALCURRENTASSETS, wxID_PANELASSETSTCYUNXING, 
] = [wx.NewId() for _init_ctrls in range(61)]

class PanelAssets(wx.Panel):
    def _init_ctrls(self, prnt):
        # generated method, don't edit
        wx.Panel.__init__(self, id=wxID_PANELASSETS, name=u'PanelAssets',
              parent=prnt, pos=wx.Point(759, 294), size=wx.Size(1015, 737),
              style=wx.TAB_TRAVERSAL)
        self.SetClientSize(wx.Size(999, 699))
        self.SetFont(wx.Font(12, wx.SWISS, wx.NORMAL, wx.BOLD, False,
              u'\u6977\u4f53_GB2312'))
        self.SetBackgroundColour(wx.Colour(183, 209, 173))

        self.staticText1 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT1,
              label=u'\u8d44\u4ea7\u8d1f\u503a\u8868', name='staticText1',
              parent=self, pos=wx.Point(296, 16), size=wx.Size(85, 16),
              style=0)

        self.staticText2 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT2,
              label=u'\u6d41\u52a8\u8d44\u4ea7\u5408\u8ba1\uff1a',
              name='staticText2', parent=self, pos=wx.Point(56, 64),
              size=wx.Size(119, 16), style=0)

        self.staticText3 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT3,
              label=u'\u957f\u671f\u8d1f\u503a\uff1a', name='staticText3',
              parent=self, pos=wx.Point(392, 224), size=wx.Size(85, 16),
              style=0)

        self.staticText4 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT4,
              label=u'\u975e\u6d41\u52a8\u8d44\u4ea7\u5408\u8ba1\uff1a',
              name='staticText4', parent=self, pos=wx.Point(56, 328),
              size=wx.Size(136, 16), style=0)

        self.staticText5 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT5,
              label=u'\u77ed\u671f\u8d1f\u503a\uff1a', name='staticText5',
              parent=self, pos=wx.Point(408, 96), size=wx.Size(85, 16),
              style=0)

        self.staticText6 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT6,
              label=u'\u6240\u6709\u8005\u6743\u76ca\u5408\u8ba1\uff1a',
              name='staticText6', parent=self, pos=wx.Point(392, 296),
              size=wx.Size(136, 16), style=0)

        self.staticText7 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT7,
              label=u'\u8d44\u4ea7\u5408\u8ba1\uff1a', name='staticText7',
              parent=self, pos=wx.Point(64, 456), size=wx.Size(85, 16),
              style=0)

        self.staticText8 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT8,
              label=u'\u8d27\u5e01\u8d44\u4ea7\uff1a', name='staticText8',
              parent=self, pos=wx.Point(80, 96), size=wx.Size(85, 16), style=0)

        self.btnSave = wx.Button(id=wxID_PANELASSETSBTNSAVE,
              label=u'\u4fdd\u5b58\u4fee\u6539', name=u'btnSave', parent=self,
              pos=wx.Point(856, 40), size=wx.Size(88, 26), style=0)
        self.btnSave.Bind(wx.EVT_BUTTON, self.OnBtnSaveButton,
              id=wxID_PANELASSETSBTNSAVE)

        self.staticText9 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT9,
              label=u'\u5e94\u6536\u8d26\u6b3e\uff1a', name='staticText9',
              parent=self, pos=wx.Point(80, 128), size=wx.Size(85, 16),
              style=0)

        self.staticText10 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT10,
              label=u'\u5b58\u8d27\uff1a', name='staticText10', parent=self,
              pos=wx.Point(80, 256), size=wx.Size(51, 16), style=0)

        self.staticText11 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT11,
              label=u'\u9884\u4ed8\u8d26\u6b3e\uff1a', name='staticText11',
              parent=self, pos=wx.Point(80, 224), size=wx.Size(85, 16),
              style=0)

        self.staticText12 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT12,
              label=u'\u56fa\u5b9a\u8d44\u4ea7\uff1a', name='staticText12',
              parent=self, pos=wx.Point(80, 360), size=wx.Size(85, 16),
              style=0)

        self.staticText13 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT13,
              label=u'\u673a\u5668\u548c\u8bbe\u5907\u539f\u4ef7\uff1a',
              name='staticText13', parent=self, pos=wx.Point(80, 392),
              size=wx.Size(136, 16), style=0)

        self.staticText14 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT14,
              label=u'\u6d41\u52a8\u8d1f\u503a\u5408\u8ba1\uff1a',
              name='staticText14', parent=self, pos=wx.Point(384, 64),
              size=wx.Size(119, 16), style=0)

        self.staticText15 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT15,
              label=u'\u5e94\u4ed8\u8d26\u6b3e\uff1a', name='staticText15',
              parent=self, pos=wx.Point(408, 128), size=wx.Size(85, 16),
              style=0)

        self.staticText16 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT16,
              label=u'\u5b9e\u6536\u80a1\u4e1c\u8d44\u672c\uff1a',
              name='staticText16', parent=self, pos=wx.Point(424, 328),
              size=wx.Size(119, 16), style=0)

        self.staticText17 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT17,
              label=u'\u672a\u5206\u914d\u5229\u6da6\uff1a',
              name='staticText17', parent=self, pos=wx.Point(424, 424),
              size=wx.Size(102, 16), style=0)

        self.staticText18 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT18,
              label=u'\u8d1f\u503a+\u6240\u6709\u8005\u6743\u76ca\uff1a',
              name='staticText18', parent=self, pos=wx.Point(392, 456),
              size=wx.Size(145, 16), style=0)

        self.staticText19 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT19,
              label=u'\u51cf\u7d2f\u8ba1\u6298\u65e7\uff1a',
              name='staticText19', parent=self, pos=wx.Point(112, 424),
              size=wx.Size(102, 16), style=0)

        self.staticText20 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT20,
              label=u'\u8d44\u672c\u516c\u79ef\uff1a', name='staticText20',
              parent=self, pos=wx.Point(424, 360), size=wx.Size(85, 16),
              style=0)

        self.staticText21 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT21,
              label=u'\u76c8\u4f59\u516c\u79ef\uff1a', name='staticText21',
              parent=self, pos=wx.Point(424, 392), size=wx.Size(85, 16),
              style=0)

        self.staticText22 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT22,
              label=u'\u9884\u6536\u8d26\u6b3e\uff1a', name='staticText22',
              parent=self, pos=wx.Point(408, 160), size=wx.Size(85, 16),
              style=0)

        self.staticText23 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT23,
              label=u'\u5176\u4ed6\u6d41\u52a8\u8d44\u4ea7\uff1a',
              name='staticText23', parent=self, pos=wx.Point(80, 288),
              size=wx.Size(119, 16), style=0)

        self.staticText24 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT24,
              label=u'\u5176\u4ed6\u5e94\u4ed8\u6b3e\uff1a',
              name='staticText24', parent=self, pos=wx.Point(408, 192),
              size=wx.Size(102, 16), style=0)

        self.tcTotalCurrentAssets = wx.TextCtrl(id=wxID_PANELASSETSTCTOTALCURRENTASSETS,
              name=u'tcTotalCurrentAssets', parent=self, pos=wx.Point(216, 56),
              size=wx.Size(120, 26), style=wx.TE_RIGHT, value=u'')
        self.tcTotalCurrentAssets.Enable(False)
        self.tcTotalCurrentAssets.Bind(wx.EVT_TEXT,
              self.OnTcTotalCurrentAssetsText,
              id=wxID_PANELASSETSTCTOTALCURRENTASSETS)

        self.tcCash = wx.TextCtrl(id=wxID_PANELASSETSTCCASH, name=u'tcCash',
              parent=self, pos=wx.Point(216, 88), size=wx.Size(120, 26),
              style=wx.TE_RIGHT, value=u'')
        self.tcCash.SetBackgroundColour(wx.Colour(186, 255, 117))
        self.tcCash.Bind(wx.EVT_TEXT, self.OnTcCashText,
              id=wxID_PANELASSETSTCCASH)

        self.tcAccountRecv = wx.TextCtrl(id=wxID_PANELASSETSTCACCOUNTRECV,
              name=u'tcAccountRecv', parent=self, pos=wx.Point(216, 120),
              size=wx.Size(120, 26), style=wx.TE_RIGHT, value=u'')
        self.tcAccountRecv.Bind(wx.EVT_TEXT, self.OnTcAccountRecvText,
              id=wxID_PANELASSETSTCACCOUNTRECV)

        self.tcAccountPrepaid = wx.TextCtrl(id=wxID_PANELASSETSTCACCOUNTPREPAID,
              name=u'tcAccountPrepaid', parent=self, pos=wx.Point(216, 216),
              size=wx.Size(120, 26), style=wx.TE_RIGHT, value=u'')
        self.tcAccountPrepaid.Bind(wx.EVT_TEXT, self.OnTcAccountPrepaidText,
              id=wxID_PANELASSETSTCACCOUNTPREPAID)

        self.tcInventories = wx.TextCtrl(id=wxID_PANELASSETSTCINVENTORIES,
              name=u'tcInventories', parent=self, pos=wx.Point(216, 248),
              size=wx.Size(120, 26), style=wx.TE_RIGHT, value=u'')
        self.tcInventories.Bind(wx.EVT_TEXT, self.OnTcInventoriesText,
              id=wxID_PANELASSETSTCINVENTORIES)

        self.tcOtherAssets = wx.TextCtrl(id=wxID_PANELASSETSTCOTHERASSETS,
              name=u'tcOtherAssets', parent=self, pos=wx.Point(216, 280),
              size=wx.Size(120, 26), style=wx.TE_RIGHT, value=u'')
        self.tcOtherAssets.SetBackgroundColour(wx.Colour(186, 255, 117))
        self.tcOtherAssets.Bind(wx.EVT_TEXT, self.OnTcOtherAssetsText,
              id=wxID_PANELASSETSTCOTHERASSETS)

        self.tcNonCurrentAssets = wx.TextCtrl(id=wxID_PANELASSETSTCNONCURRENTASSETS,
              name=u'tcNonCurrentAssets', parent=self, pos=wx.Point(216, 320),
              size=wx.Size(120, 26), style=wx.TE_RIGHT, value=u'')
        self.tcNonCurrentAssets.Enable(False)
        self.tcNonCurrentAssets.Bind(wx.EVT_TEXT, self.OnTcNonCurrentAssetsText,
              id=wxID_PANELASSETSTCNONCURRENTASSETS)

        self.tcFixedAssets = wx.TextCtrl(id=wxID_PANELASSETSTCFIXEDASSETS,
              name=u'tcFixedAssets', parent=self, pos=wx.Point(216, 352),
              size=wx.Size(120, 26), style=wx.TE_RIGHT, value=u'')
        self.tcFixedAssets.SetBackgroundColour(wx.Colour(186, 255, 117))
        self.tcFixedAssets.Bind(wx.EVT_TEXT, self.OnTcFixedAssetsText,
              id=wxID_PANELASSETSTCFIXEDASSETS)

        self.tcQuipPriceOri = wx.TextCtrl(id=wxID_PANELASSETSTCQUIPPRICEORI,
              name=u'tcQuipPriceOri', parent=self, pos=wx.Point(216, 384),
              size=wx.Size(120, 26), style=wx.TE_RIGHT, value=u'')
        self.tcQuipPriceOri.SetBackgroundColour(wx.Colour(186, 255, 117))
        self.tcQuipPriceOri.Bind(wx.EVT_TEXT, self.OnTcQuipPriceOriText,
              id=wxID_PANELASSETSTCQUIPPRICEORI)

        self.tcDepreciation = wx.TextCtrl(id=wxID_PANELASSETSTCDEPRECIATION,
              name=u'tcDepreciation', parent=self, pos=wx.Point(216, 416),
              size=wx.Size(120, 26), style=wx.TE_RIGHT, value=u'')
        self.tcDepreciation.SetBackgroundColour(wx.Colour(186, 255, 117))
        self.tcDepreciation.Bind(wx.EVT_TEXT, self.OnTcDepreciationText,
              id=wxID_PANELASSETSTCDEPRECIATION)

        self.tcTotalAssets = wx.TextCtrl(id=wxID_PANELASSETSTCTOTALASSETS,
              name=u'tcTotalAssets', parent=self, pos=wx.Point(216, 448),
              size=wx.Size(120, 26), style=wx.TE_RIGHT, value=u'')
        self.tcTotalAssets.Enable(False)
        self.tcTotalAssets.Bind(wx.EVT_TEXT, self.OnTcTotalAssetsText,
              id=wxID_PANELASSETSTCTOTALASSETS)

        self.tcCurrentLiabilities = wx.TextCtrl(id=wxID_PANELASSETSTCCURRENTLIABILITIES,
              name=u'tcCurrentLiabilities', parent=self, pos=wx.Point(552, 56),
              size=wx.Size(124, 26), style=wx.TE_RIGHT, value=u'')
        self.tcCurrentLiabilities.Enable(False)
        self.tcCurrentLiabilities.Bind(wx.EVT_TEXT,
              self.OnTcCurrentLiabilitiesText,
              id=wxID_PANELASSETSTCCURRENTLIABILITIES)

        self.tcShortTerm = wx.TextCtrl(id=wxID_PANELASSETSTCSHORTTERM,
              name=u'tcShortTerm', parent=self, pos=wx.Point(552, 88),
              size=wx.Size(124, 26), style=wx.TE_RIGHT, value=u'')
        self.tcShortTerm.SetBackgroundColour(wx.Colour(186, 255, 117))
        self.tcShortTerm.Bind(wx.EVT_TEXT, self.OnTcShortTermText,
              id=wxID_PANELASSETSTCSHORTTERM)

        self.tcAccountPayable = wx.TextCtrl(id=wxID_PANELASSETSTCACCOUNTPAYABLE,
              name=u'tcAccountPayable', parent=self, pos=wx.Point(552, 120),
              size=wx.Size(124, 26), style=wx.TE_RIGHT, value=u'')
        self.tcAccountPayable.Bind(wx.EVT_TEXT, self.OnTcAccountPayableText,
              id=wxID_PANELASSETSTCACCOUNTPAYABLE)

        self.tcAdvanceReceipts = wx.TextCtrl(id=wxID_PANELASSETSTCADVANCERECEIPTS,
              name=u'tcAdvanceReceipts', parent=self, pos=wx.Point(552, 152),
              size=wx.Size(124, 26), style=wx.TE_RIGHT, value=u'')
        self.tcAdvanceReceipts.SetBackgroundColour(wx.Colour(186, 255, 117))
        self.tcAdvanceReceipts.Bind(wx.EVT_TEXT, self.OnTcAdvanceReceiptsText,
              id=wxID_PANELASSETSTCADVANCERECEIPTS)

        self.tcOtherPayables = wx.TextCtrl(id=wxID_PANELASSETSTCOTHERPAYABLES,
              name=u'tcOtherPayables', parent=self, pos=wx.Point(552, 184),
              size=wx.Size(124, 26), style=wx.TE_RIGHT, value=u'')
        self.tcOtherPayables.SetBackgroundColour(wx.Colour(186, 255, 117))
        self.tcOtherPayables.Bind(wx.EVT_TEXT, self.OnTcOtherPayablesText,
              id=wxID_PANELASSETSTCOTHERPAYABLES)

        self.tcLongLiabilities = wx.TextCtrl(id=wxID_PANELASSETSTCLONGLIABILITIES,
              name=u'tcLongLiabilities', parent=self, pos=wx.Point(552, 216),
              size=wx.Size(124, 26), style=wx.TE_RIGHT, value=u'')
        self.tcLongLiabilities.SetBackgroundColour(wx.Colour(186, 255, 117))
        self.tcLongLiabilities.Bind(wx.EVT_TEXT, self.OnTcLongLiabilitiesText,
              id=wxID_PANELASSETSTCLONGLIABILITIES)

        self.tcOwnerEquity = wx.TextCtrl(id=wxID_PANELASSETSTCOWNEREQUITY,
              name=u'tcOwnerEquity', parent=self, pos=wx.Point(552, 288),
              size=wx.Size(124, 26), style=wx.TE_RIGHT, value=u'')
        self.tcOwnerEquity.Bind(wx.EVT_TEXT, self.OnTcOwnerEquityText,
              id=wxID_PANELASSETSTCOWNEREQUITY)

        self.tcCapital = wx.TextCtrl(id=wxID_PANELASSETSTCCAPITAL,
              name=u'tcCapital', parent=self, pos=wx.Point(552, 320),
              size=wx.Size(124, 26), style=wx.TE_RIGHT, value=u'')
        self.tcCapital.SetBackgroundColour(wx.Colour(186, 255, 117))
        self.tcCapital.Bind(wx.EVT_TEXT, self.OnTcCapitalText,
              id=wxID_PANELASSETSTCCAPITAL)

        self.tcCapticalReserve = wx.TextCtrl(id=wxID_PANELASSETSTCCAPTICALRESERVE,
              name=u'tcCapticalReserve', parent=self, pos=wx.Point(552, 352),
              size=wx.Size(124, 26), style=wx.TE_RIGHT, value=u'')
        self.tcCapticalReserve.SetBackgroundColour(wx.Colour(186, 255, 117))
        self.tcCapticalReserve.Bind(wx.EVT_TEXT, self.OnTcCapticalReserveText,
              id=wxID_PANELASSETSTCCAPTICALRESERVE)

        self.tcEarningsReserve = wx.TextCtrl(id=wxID_PANELASSETSTCEARNINGSRESERVE,
              name=u'tcEarningsReserve', parent=self, pos=wx.Point(552, 384),
              size=wx.Size(124, 26), style=wx.TE_RIGHT, value=u'')
        self.tcEarningsReserve.Bind(wx.EVT_TEXT, self.OnTcEarningsReserveText,
              id=wxID_PANELASSETSTCEARNINGSRESERVE)

        self.tcRetainedEarnings = wx.TextCtrl(id=wxID_PANELASSETSTCRETAINEDEARNINGS,
              name=u'tcRetainedEarnings', parent=self, pos=wx.Point(552, 416),
              size=wx.Size(124, 26), style=wx.TE_RIGHT, value=u'')
        self.tcRetainedEarnings.SetBackgroundColour(wx.Colour(186, 255, 117))
        self.tcRetainedEarnings.Bind(wx.EVT_TEXT, self.OnTcRetainedEarningsText,
              id=wxID_PANELASSETSTCRETAINEDEARNINGS)

        self.tcOwnerAndLiabilities = wx.TextCtrl(id=wxID_PANELASSETSTCOWNERANDLIABILITIES,
              name=u'tcOwnerAndLiabilities', parent=self, pos=wx.Point(552,
              448), size=wx.Size(124, 26), style=wx.TE_RIGHT, value=u'')
        self.tcOwnerAndLiabilities.Enable(False)
        self.tcOwnerAndLiabilities.Bind(wx.EVT_TEXT,
              self.OnTcOwnerAndLiabilitiesText,
              id=wxID_PANELASSETSTCOWNERANDLIABILITIES)

        self.btnReCalc = wx.Button(id=wxID_PANELASSETSBTNRECALC,
              label=u'\u5168\u90e8\u91cd\u7b97', name=u'btnReCalc', parent=self,
              pos=wx.Point(760, 40), size=wx.Size(88, 26), style=0)
        self.btnReCalc.Bind(wx.EVT_BUTTON, self.OnBtnReCalcButton,
              id=wxID_PANELASSETSBTNRECALC)

        self.btnDel = wx.Button(id=wxID_PANELASSETSBTNDEL,
              label=u'\u5220\u9664\u9009\u4e2d', name=u'btnDel', parent=self,
              pos=wx.Point(856, 72), size=wx.Size(88, 26), style=0)
        self.btnDel.Bind(wx.EVT_BUTTON, self.OnBtnDelButton,
              id=wxID_PANELASSETSBTNDEL)

        self.staticText25 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT25,
              label=u'\u5176\u4e2d:\u4e91\u661f', name='staticText25',
              parent=self, pos=wx.Point(96, 160), size=wx.Size(77, 16),
              style=0)

        self.tcYunXing = wx.TextCtrl(id=wxID_PANELASSETSTCYUNXING,
              name=u'tcYunXing', parent=self, pos=wx.Point(216, 152),
              size=wx.Size(120, 26), style=wx.TE_RIGHT, value=u'')

        self.staticText26 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT26,
              label=u'\u5446\u8d26', name='staticText26', parent=self,
              pos=wx.Point(136, 192), size=wx.Size(34, 16), style=0)

        self.tcBadDebts = wx.TextCtrl(id=wxID_PANELASSETSTCBADDEBTS,
              name=u'tcBadDebts', parent=self, pos=wx.Point(216, 184),
              size=wx.Size(120, 26), style=wx.TE_RIGHT, value=u'')

        self.btnSaveNew = wx.Button(id=wxID_PANELASSETSBTNSAVENEW,
              label=u'\u4fdd\u5b58\u65b0\u8868', name=u'btnSaveNew',
              parent=self, pos=wx.Point(760, 72), size=wx.Size(88, 26),
              style=0)
        self.btnSaveNew.Bind(wx.EVT_BUTTON, self.OnBtnSaveNewButton,
              id=wxID_PANELASSETSBTNSAVENEW)

        self.tcTotalBadDebts = wx.TextCtrl(id=wxID_PANELASSETSTCTOTALBADDEBTS,
              name=u'tcTotalBadDebts', parent=self, pos=wx.Point(832, 488),
              size=wx.Size(100, 26), style=wx.TE_RIGHT, value=u'')
        self.tcTotalBadDebts.SetBackgroundColour(wx.Colour(186, 255, 117))

        self.staticText27 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT27,
              label=u'\u5386\u53f2\u574f\u8d26\u603b\u6570\uff1a',
              name='staticText27', parent=self, pos=wx.Point(696, 496),
              size=wx.Size(119, 16), style=0)

        self.tcMemo = wx.TextCtrl(id=wxID_PANELASSETSTCMEMO, name=u'tcMemo',
              parent=self, pos=wx.Point(64, 488), size=wx.Size(608, 176),
              style=wx.TE_MULTILINE, value=u'')

        self.staticText28 = wx.StaticText(id=wxID_PANELASSETSSTATICTEXT28,
              label=u'\u8d44\u4ea7\u8d1f\u503a\u7387=\u8d1f\u503a/\u8d44\u4ea7=',
              name='staticText28', parent=self, pos=wx.Point(696, 536),
              size=wx.Size(180, 16), style=0)

        self.stGearing = wx.StaticText(id=wxID_PANELASSETSSTGEARING, label=u'%',
              name=u'stGearing', parent=self, pos=wx.Point(896, 536),
              size=wx.Size(32, 16), style=0)

    def __init__(self, parent):
        self._init_ctrls(parent)
        
        self.curObj = None

        cols = [(CDataAssets.fi_name, wx.LIST_FORMAT_LEFT, 90),
                (CDataAssets.fi_totalOwnerEquity, wx.LIST_FORMAT_RIGHT, 90),
                (CDataAssets.fi_inventories, wx.LIST_FORMAT_RIGHT, 90)]
                
        #self.listCtrl  = MyListCtrlDecorator(self.lc, cols, CDataCustomerRegion)
        
        self.lc = MySimpleListCtrl(self, CDataAssets, cols)
        self.lc.Move(wx.Point(680, 120))
        self.lc.SetSize(wx.Size(310, 340))
        #self.lc.refresh()
        self.lc.Bind(wx.EVT_LIST_ITEM_SELECTED, self.OnListItemSelected)

        self.btnSave.Enable(False)
        self.btnDel.Enable(False)

    def OnListItemSelected(self, event):
        item = self.lc.GetNextItem(-1, state = wx.LIST_STATE_SELECTED)
        if (item == -1):
            return

        self.curObj = CDataAssets.getData({"id":self.lc.GetItemText(item)})
        self.ShowData()

        self.btnSave.Enable(True)
        self.btnDel.Enable(True)
    
    def ShowData(self):
        obj = self.curObj

        #CDataAssets.fi_name : dlg.GetValue(),
        self.tcTotalCurrentAssets.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_totalCurrentAssets)))
        self.tcCash.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_cash)))
        #CDataAssets.fi_cashMemo :CDataAssets.appendField('cashMemo', u'货币资金备注')
        self.tcAccountRecv.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_accountRecv)))
        #CDataAssets.fi_accountRecvMemo :CDataAssets.appendField('accountResvMemo', u'应收账款备注')
        self.tcYunXing.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_yunxingDebts)))
        #CDataAssets.fi_yunxingDebtsMemo :CDataAssets.appendField('yunxingDebtsMemo', u'云星应收备注')
        self.tcBadDebts.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_badDebts)))
        #CDataAssets.fi_badDebtsMemo :CDataAssets.appendField('badDebtsMemo', u'呆账备注')
        self.tcAccountPrepaid.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_accountPrepaid)))
        #CDataAssets.fi_accountPrepaidMemo :CDataAssets.appendField('accountPrepaidMemo', u'预付账款备注')
        self.tcInventories.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_inventories)))
        #CDataAssets.fi_inventoriesMemo :CDataAssets.appendField('inventoriesMemo', u'存货备注')
        self.tcTotalCurrentAssets.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_otherCurrentAssets)))
        #CDataAssets.fi_otherCurrentAssetsMemo :CDataAssets.appendField('otherCurrentAssetsMemo', u'其他流动资产备注')
        self.tcNonCurrentAssets.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_totalNonCurentAssets)))
        self.tcFixedAssets.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_fixedAssets)))
        #CDataAssets.fi_fixedAssetsMemo :CDataAssets.appendField('fixedAssetsMemo', u'固定资产备注')
        self.tcQuipPriceOri.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_quipOriPrice)))
        #CDataAssets.fi_quipOriPriceMemo :CDataAssets.appendField('quipOriPriceMemo', u'设备原价备注')
        self.tcDepreciation.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_quipDepreciation)))
        #CDataAssets.fi_quipDepreciationMemo :CDataAssets.appendField('quipDepreciationMemo', u'设备折旧备注')
        self.tcTotalAssets.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_totalAssets)))
        self.tcCurrentLiabilities.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_totalCurrentLiabilities)))
        self.tcShortTerm.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_shortTerm)))
        #CDataAssets.fi_shortTermMemo :CDataAssets.appendField('shortTermMemo', u'短期负债备注')
        self.tcAccountPayable.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_accountPayable)))
        #CDataAssets.fi_accountPayableMemo :CDataAssets.appendField('accountPayableMemo', u'应付账款备注')
        self.tcAdvanceReceipts.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_advanceReceipts)))
        #CDataAssets.fi_advanceReceiptsMemo :CDataAssets.appendField('advanceReceiptsMemo', u'预收账款备注')
        self.tcOtherPayables.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_otherPayables)))
        #CDataAssets.fi_otherPayablesMemo :CDataAssets.appendField('otherPayablesMemo', u'其他应付款备注')
        self.tcLongLiabilities.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_longLiabilities)))
        #CDataAssets.fi_longLiabilitiesMemo :CDataAssets.appendField('longLiabilitiesMemo', u'长期负债备注')
        self.tcOwnerEquity.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_totalOwnerEquity)))
        self.tcCapital.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_capital)))
        #CDataAssets.fi_capitalMemo :self.tcOtherPayables.GetValue(),
        self.tcCapticalReserve.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_capitalReserve)))
        #CDataAssets.fi_capitalReserveMemo :CDataAssets.appendField('capitalReserveMemo', u'资本公积备注')
        self.tcEarningsReserve.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_earningReserve)))
        #CDataAssets.fi_earningReserveMemo :CDataAssets.appendField('earningReserveMemo', u'盈余公积备注')
        self.tcRetainedEarnings.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_retainedEarnings)))
        #CDataAssets.fi_retainedEarningsMemo :CDataAssets.appendField('retainedEarningsMemo', u'未分配利润备注')
        self.tcTotalBadDebts.SetValue("%.0f" %(obj.getValue(CDataAssets.fi_totalBadDebts)))
        #CDataAssets.fi_totalBadDebtsMemo :CDataAssets.appendField('totalBadDebtsMemo', u'坏账备注')
        self.tcMemo.SetValue(obj.getValue(CDataAssets.fi_memo))

    def getData(self):

        data = {
            #CDataAssets.fi_name : dlg.GetValue(),
            CDataAssets.fi_totalCurrentAssets : kit.toFloatOrZero( self.tcTotalCurrentAssets.GetValue()),
            CDataAssets.fi_cash : kit.toFloatOrZero( self.tcCash.GetValue()),
            #CDataAssets.fi_cashMemo : kit.toFloatOrZero(CDataAssets.appendField('cashMemo', u'货币资金备注')
            CDataAssets.fi_accountRecv : kit.toFloatOrZero( self.tcAccountRecv.GetValue()),
            #CDataAssets.fi_accountRecvMemo : kit.toFloatOrZero(CDataAssets.appendField('accountResvMemo', u'应收账款备注')
            CDataAssets.fi_yunxingDebts : kit.toFloatOrZero( self.tcYunXing.GetValue()),
            #CDataAssets.fi_yunxingDebtsMemo : kit.toFloatOrZero(CDataAssets.appendField('yunxingDebtsMemo', u'云星应收备注')
            CDataAssets.fi_badDebts : kit.toFloatOrZero(self.tcBadDebts.GetValue()),
            #CDataAssets.fi_badDebtsMemo : kit.toFloatOrZero(CDataAssets.appendField('badDebtsMemo', u'呆账备注')
            CDataAssets.fi_accountPrepaid : kit.toFloatOrZero(self.tcAccountPrepaid.GetValue()),
            #CDataAssets.fi_accountPrepaidMemo : kit.toFloatOrZero(CDataAssets.appendField('accountPrepaidMemo', u'预付账款备注')
            CDataAssets.fi_inventories : kit.toFloatOrZero(self.tcInventories.GetValue()),
            #CDataAssets.fi_inventoriesMemo : kit.toFloatOrZero(CDataAssets.appendField('inventoriesMemo', u'存货备注')
            CDataAssets.fi_otherCurrentAssets : kit.toFloatOrZero(self.tcTotalCurrentAssets.GetValue()),
            #CDataAssets.fi_otherCurrentAssetsMemo : kit.toFloatOrZero(CDataAssets.appendField('otherCurrentAssetsMemo', u'其他流动资产备注')
            CDataAssets.fi_totalNonCurentAssets : kit.toFloatOrZero(self.tcNonCurrentAssets.GetValue()),
            CDataAssets.fi_fixedAssets : kit.toFloatOrZero(self.tcFixedAssets.GetValue()),
            #CDataAssets.fi_fixedAssetsMemo : kit.toFloatOrZero(CDataAssets.appendField('fixedAssetsMemo', u'固定资产备注')
            CDataAssets.fi_quipOriPrice : kit.toFloatOrZero(self.tcQuipPriceOri.GetValue()),
            #CDataAssets.fi_quipOriPriceMemo : kit.toFloatOrZero(CDataAssets.appendField('quipOriPriceMemo', u'设备原价备注')
            CDataAssets.fi_quipDepreciation : kit.toFloatOrZero(self.tcDepreciation.GetValue()),
            #CDataAssets.fi_quipDepreciationMemo : kit.toFloatOrZero(CDataAssets.appendField('quipDepreciationMemo', u'设备折旧备注')
            CDataAssets.fi_totalAssets : kit.toFloatOrZero(self.tcTotalAssets.GetValue()),
            CDataAssets.fi_totalCurrentLiabilities : kit.toFloatOrZero(self.tcCurrentLiabilities.GetValue()),
            CDataAssets.fi_shortTerm : kit.toFloatOrZero(self.tcShortTerm.GetValue()),
            #CDataAssets.fi_shortTermMemo : kit.toFloatOrZero(CDataAssets.appendField('shortTermMemo', u'短期负债备注')
            CDataAssets.fi_accountPayable : kit.toFloatOrZero(self.tcAccountPayable.GetValue()),
            #CDataAssets.fi_accountPayableMemo : kit.toFloatOrZero(CDataAssets.appendField('accountPayableMemo', u'应付账款备注')
            CDataAssets.fi_advanceReceipts : kit.toFloatOrZero(self.tcAdvanceReceipts.GetValue()),
            #CDataAssets.fi_advanceReceiptsMemo : kit.toFloatOrZero(CDataAssets.appendField('advanceReceiptsMemo', u'预收账款备注')
            CDataAssets.fi_otherPayables : kit.toFloatOrZero(self.tcOtherPayables.GetValue()),
            #CDataAssets.fi_otherPayablesMemo : kit.toFloatOrZero(CDataAssets.appendField('otherPayablesMemo', u'其他应付款备注')
            CDataAssets.fi_longLiabilities : kit.toFloatOrZero(self.tcLongLiabilities.GetValue()),
            #CDataAssets.fi_longLiabilitiesMemo : kit.toFloatOrZero(CDataAssets.appendField('longLiabilitiesMemo', u'长期负债备注')
            CDataAssets.fi_totalOwnerEquity : kit.toFloatOrZero(self.tcOwnerEquity.GetValue()),
            CDataAssets.fi_capital : kit.toFloatOrZero(self.tcCapital.GetValue()),
            #CDataAssets.fi_capitalMemo : kit.toFloatOrZero(self.tcOtherPayables.GetValue(),
            CDataAssets.fi_capitalReserve : kit.toFloatOrZero(self.tcCapticalReserve.GetValue()),
            #CDataAssets.fi_capitalReserveMemo : kit.toFloatOrZero(CDataAssets.appendField('capitalReserveMemo', u'资本公积备注')
            CDataAssets.fi_earningReserve : kit.toFloatOrZero(self.tcEarningsReserve.GetValue()),
            #CDataAssets.fi_earningReserveMemo : kit.toFloatOrZero(CDataAssets.appendField('earningReserveMemo', u'盈余公积备注')
            CDataAssets.fi_retainedEarnings : kit.toFloatOrZero(self.tcRetainedEarnings.GetValue()),
            #CDataAssets.fi_retainedEarningsMemo : kit.toFloatOrZero(CDataAssets.appendField('retainedEarningsMemo', u'未分配利润备注')
            CDataAssets.fi_totalBadDebts : kit.toFloatOrZero(self.tcTotalBadDebts.GetValue()),
            #CDataAssets.fi_totalBadDebtsMemo : kit.toFloatOrZero(CDataAssets.appendField('totalBadDebtsMemo', u'坏账备注')
            CDataAssets.fi_memo :self.tcMemo.GetValue(),
        }

        return data


    def OnBtnSaveButton(self, event):
        ''' 保存修改 '''

        if self.curObj is None:
            return

        dlg = wx.MessageDialog(self, u'是否覆盖原记录？',u'提示',
                                    wx.YES_NO|wx.ICON_QUESTION)
        if(dlg.ShowModal() == wx.ID_NO):
            return

        self.curObj.setMulFieldVal(self.getData())
        self.curObj.update()

    def OnBtnSaveNewButton(self, event):
        ''' 保存新表 '''
        
        import datetime

        if (self.tcTotalAssets.GetValue() == ""):
            return
                
        dlg = wx.TextEntryDialog(self, u'输入表名',
                                u'输入表名',datetime.date.today().strftime("%y%m%d"),wx.OK|wx.CANCEL|wx.CENTRE)
        if dlg.ShowModal() != wx.ID_OK:
            return
        name = dlg.GetValue()
        
        data = self.getData()
        data[CDataAssets.fi_name] = name
        
        obj = CDataAssets.factory()
        obj.setMulFieldVal(data)
        obj.insert()
        self.curObj = obj

        self.lc.refresh()
        
        
    def OnBtnReCalcButton(self, event):
        ''' 全部重算 
        
            调用全部的[重算]按钮，并执行相关反算
        '''
        self.OnBtnReceivableButton(event)
        self.OnBtnPrepaidAccountButton(event)
        self.OnBtnInventoriesButton(event)
        self.OnBtnAccountPayableButton(event)
        self.OnBtnYunxingButton(event)
        self.OnBtnBadDebtsButton(event)

    def OnBtnDelButton(self, event):
        ''' 删除选中记录 '''
        if self.curObj is not None:
            self.curObj.delete()
            self.lc.refresh()
      

    def OnBtnReceivableButton(self, event):
        self.tcAccountRecv.SetValue("%.0f" %(CDataAssets.GetAccountReceivable() or 0))

    def OnBtnPrepaidAccountButton(self, event):
        self.tcAccountPrepaid.SetValue("%.0f" %(CDataAssets.GetAccountPrepaid() or 0))

    def OnBtnInventoriesButton(self, event):
        self.tcInventories.SetValue("%.0f" %(CDataAssets.GetInventories() or 0))  

    def OnBtnAccountPayableButton(self, event):
        self.tcAccountPayable.SetValue("%.0f" %(CDataAssets.GetAccountPayable() or 0))     

    def OnBtnYunxingButton(self, event):
        self.tcYunXing.SetValue("%.0f" %(CDataAssets.GetYunxingDebts() or 0))
        
    def RecalTotalCurrentAssets(self):
        ''' 流动资产合计，自动求和 '''
        cash = kit.toFloatOrZero(self.tcCash.GetValue())
        accountRecv = kit.toFloatOrZero(self.tcAccountRecv.GetValue())
        accountPrepaid = kit.toFloatOrZero(self.tcAccountPrepaid.GetValue())
        inventories = kit.toFloatOrZero(self.tcInventories.GetValue())
        otherAssets = kit.toFloatOrZero(self.tcOtherAssets.GetValue())
        self.tcTotalCurrentAssets.SetValue("%.0f" %(cash + accountRecv + accountPrepaid + inventories + otherAssets))

    def OnTcCashText(self, event):
        self.RecalTotalCurrentAssets()

    def OnTcAccountRecvText(self, event):
        self.RecalTotalCurrentAssets()

    def OnTcAccountPrepaidText(self, event):
        self.RecalTotalCurrentAssets()

    def OnTcInventoriesText(self, event):
        self.RecalTotalCurrentAssets()

    def OnTcOtherAssetsText(self, event):
        self.RecalTotalCurrentAssets()
        
    def RecalTotalAssets(self):
        ''' 资产合计，自动求和 '''
        currentAssets = kit.toFloatOrZero(self.tcTotalCurrentAssets.GetValue())
        nonCurrentAssets = kit.toFloatOrZero(self.tcNonCurrentAssets.GetValue())
        self.tcTotalAssets.SetValue("%.0f" %(currentAssets + nonCurrentAssets))

    def OnTcTotalCurrentAssetsText(self, event):
        self.RecalTotalAssets()

    def OnTcNonCurrentAssetsText(self, event):
        self.RecalTotalAssets()

    def RecalNonCurrentAssets(self):
        ''' 资产合计，自动求和 '''
        fixedAssets = kit.toFloatOrZero(self.tcFixedAssets.GetValue())
        quipPriceOri = kit.toFloatOrZero(self.tcQuipPriceOri.GetValue())
        depreciation = kit.toFloatOrZero(self.tcDepreciation.GetValue())
        self.tcNonCurrentAssets.SetValue("%.0f" %(fixedAssets + quipPriceOri - depreciation))
        
        
    def OnTcFixedAssetsText(self, event):
        self.RecalNonCurrentAssets()

    def OnTcQuipPriceOriText(self, event):
        self.RecalNonCurrentAssets()

    def OnTcDepreciationText(self, event):
        self.RecalNonCurrentAssets()

    def OnTcTotalAssetsText(self, event):
        self.tcOwnerAndLiabilities.SetValue(self.tcTotalAssets.GetValue())
   
        
    def RecalCurrentLiabilities(self):
        ''' 自动重算，短期负债 '''
        shortTerm = kit.toFloatOrZero(self.tcShortTerm.GetValue())
        accountPayable = kit.toFloatOrZero(self.tcAccountPayable.GetValue())
        advanceReceipts = kit.toFloatOrZero(self.tcAdvanceReceipts.GetValue())
        otherPayables = kit.toFloatOrZero(self.tcOtherPayables.GetValue())
        self.tcCurrentLiabilities.SetValue("%.0f" %(shortTerm + accountPayable + advanceReceipts + otherPayables))

    def OnTcShortTermText(self, event):
        self.RecalCurrentLiabilities()

    def OnTcAccountPayableText(self, event):
        self.RecalCurrentLiabilities()

    def OnTcAdvanceReceiptsText(self, event):
        self.RecalCurrentLiabilities()

    def OnTcOtherPayablesText(self, event):
        self.RecalCurrentLiabilities()

    def RecalOwnerEquity(self):
        ''' 自动重算 所有者权益合计 '''
        CurrentLiabilities = kit.toFloatOrZero(self.tcCurrentLiabilities.GetValue())
        LongLiabilities = kit.toFloatOrZero(self.tcLongLiabilities.GetValue())
        OwnerAndLiabilities = kit.toFloatOrZero(self.tcOwnerAndLiabilities.GetValue())
        self.tcOwnerEquity.SetValue("%.0f" %(OwnerAndLiabilities - CurrentLiabilities - LongLiabilities))
        
    def OnTcCurrentLiabilitiesText(self, event):
        self.RecalOwnerEquity()
        
        self.RecalcGearing()
        
    def OnTcLongLiabilitiesText(self, event):
        self.RecalOwnerEquity()
        
        self.RecalcGearing()
        
    def OnTcOwnerAndLiabilitiesText(self, event):
        self.RecalOwnerEquity()
        
        self.RecalcGearing()
        
    def RecalEarningsReserve(self):
        '''自动计算 盈余公积'''
        OwnerEquity = kit.toFloatOrZero(self.tcOwnerEquity.GetValue())
        Capital = kit.toFloatOrZero(self.tcCapital.GetValue())
        CapticalReserve = kit.toFloatOrZero(self.tcCapticalReserve.GetValue())
        RetainedEarnings = kit.toFloatOrZero(self.tcRetainedEarnings.GetValue())
        self.tcEarningsReserve.SetValue("%.0f" %(OwnerEquity - Capital - CapticalReserve - RetainedEarnings))

    def OnTcOwnerEquityText(self, event):
        self.RecalEarningsReserve()

    def OnTcCapitalText(self, event):
        self.RecalEarningsReserve()

    def OnTcCapticalReserveText(self, event):
        self.RecalEarningsReserve()

    def OnTcEarningsReserveText(self, event):
        event.Skip()

    def OnTcRetainedEarningsText(self, event):
        self.RecalEarningsReserve()
        
    def RecalcGearing(self):
        CurrentLiabilities = kit.toFloatOrZero(self.tcCurrentLiabilities.GetValue())
        LongLiabilities = kit.toFloatOrZero(self.tcLongLiabilities.GetValue())
        OwnerAndLiabilities = kit.toFloatOrZero(self.tcOwnerAndLiabilities.GetValue())
        print(CurrentLiabilities ,LongLiabilities,OwnerAndLiabilities)
        if (OwnerAndLiabilities > 0):
            self.stGearing.SetLabel("%.0f%%" %((CurrentLiabilities + LongLiabilities)*100/OwnerAndLiabilities))

    def OnBtnBadDebtsButton(self, event):
        self.tcBadDebts.SetValue("%.0f" %(CDataAssets.GetBadDebts() or 0))

    
        
        
